package UCM;

import Source.DisplayEditAirport;
import Views.ViewDisplayEditAirport;

/**
 *
 * @author Joshua King
 */
public class UCDisplayEditAirport implements UCController {
    private ViewDisplayEditAirport view;
    private DisplayEditAirport model = new DisplayEditAirport();

    /**
     * Initialises the view.
     * @param view
     */
    public UCDisplayEditAirport(ViewDisplayEditAirport view) {
        this.view = view;
        view.loadTo(model);
    }

    /**
     * Precondition: user is logged in as manager
     * 1. Users clicks on the edit airport button.
     * 2. System gets Airport Data.
     * 3. System displays edit airport view.
     * Postcondition: user is on edit flight page.
     */
    public void run() {
        //2. System gets Airport Data.
        model.retrieveAirport();
        //3. System displays edit airport view.
        view.setEditAirportVisible();
    }
}
